package io.vanaheimr.account;

import io.micronaut.core.annotation.Introspected;
import io.vanaheimr.common.db.BaseEntity;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;

@Entity
@Getter
@Setter
@ToString(callSuper = true)
@Introspected
public class Resource extends BaseEntity {

    private String name;

    private String code;


    @ManyToMany
    @JoinColumn(name = "role_id", foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
    @ToString.Exclude
    private List<Role> roles;


    private String path;
}
